package de.klingbeil.hhc.client;

import java.util.List;

import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.RequestFactory;
import com.google.web.bindery.requestfactory.shared.Service;

import de.klingbeil.hhc.core.service.ItemService;
import de.klingbeil.hhc.locator.ui.SpringServiceLocator;

public interface ItemRequestFactory extends RequestFactory {

	@Service(value = ItemService.class, locator = SpringServiceLocator.class)
	public interface ItemRequestContext extends RequestContext {
		Request<ItemProxy> findById(Long id);

		Request<ItemProxy> persist(ItemProxy item);

		Request<List<ItemProxy>> findAll();
	}

	ItemRequestContext context();

}
